#include "DictionariesNeededDialog.h"

#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/hyperlink.h>

DictionariesNeededDialog::DictionariesNeededDialog():
    AnnoyingDialog(wxT("需要词典!"),wxT("拼写检查器需要词典才能正常工作.\n下页说明从何处获取词典以及如何安装词典："), wxART_INFORMATION, OK)
{
    wxSizer *outerSizer = GetSizer();

    // assuming annoying dialog is disabled if no sizer was returned here.
    // 假设在这里没有返回sizer时禁用恼人的对话框.
    if ( outerSizer )
    {
        wxSizerItemList& childs = outerSizer->GetChildren();
        wxSizer *mainArea = childs[0]->GetSizer();

        wxHyperlinkCtrl *hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, wxT("如何配置拼写检查器?"), wxT("http://wiki.codeblocks.org/index.php?title=SpellChecker_plugin"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );

        mainArea->Add(hyperlink1, 0, wxALL, 5);

        this->Layout();
        outerSizer->Fit(this);
        this->Centre( wxBOTH );
    }
}

DictionariesNeededDialog::~DictionariesNeededDialog()
{
}

